home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / lib / udev / rules.d / 60-libsane-extras.rules < prev    next >
Encoding:
Text File  |  2010-05-03  |  935 b   |  24 lines

  1. # udev rules file for scanners supported by libsane-extras
  2. #
  3. #
  4. # To add a USB device, add a rule to the list below between the
  5. # LABEL="libsane_extras_rules_begin" and LABEL="libsane_extras_rules_end" lines.
  6. #
  7. # To run a script when your scanner is plugged in, add RUN="/path/to/script"
  8. # to the appropriate rule.
  9. #
  10.  
  11. ACTION!="add", GOTO="libsane_extras_rules_end"
  12. ENV{DEVTYPE}=="usb_device", GOTO="libsane_extras_rules_begin"
  13.  
  14. LABEL="libsane_extras_rules_begin"
  15.  
  16. # For Linux >= 2.6.22 without CONFIG_USB_DEVICE_CLASS=y
  17. # If the following rule does not exist on your system yet, uncomment it
  18. # ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664", OWNER="root", GROUP="root"
  19.  
  20. # The following rule will disable USB autosuspend for the device
  21. ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'test -e /sys/$env{DEVPATH}/power/level && echo on > /sys/$env{DEVPATH}/power/level'"
  22.  
  23. LABEL="libsane_extras_rules_end"
  24.